package com.fottas.adware.payment.controller;

import com.fottas.adware.common.api.CommonResult;
import com.fottas.adware.payment.model.vo.request.PayRequest;
import com.fottas.adware.payment.service.PayService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Api(tags ="微信支付")
@Controller
@RequestMapping(value = "/wxPay")
public class WxPayController {

    @Autowired
    private PayService PayService;

    @PostMapping("/appPay")
    public CommonResult appPay(@RequestBody PayRequest request) {
        return CommonResult.success(PayService.appPay(request));
    }
}
